cmake_minimum_required(VERSION 3.5.0)

project(fxcc_project)

set(CMAKE_CXX_STANDARD 17)

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

# Windows
set(VCPKG_ROOT=D:/vcpkg)

# Linux/macOS
# export VCPKG_ROOT=/path/to/vcpkg

if(WIN32)

set(ALSOFT_STATIC ON CACHE BOOL "Use OpenAL Soft as static library" FORCE)
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Disable shared library build" FORCE)



add_subdirectory(_deps)
include_directories(${CMAKE_SOURCE_DIR}/_deps/glm)
include_directories(${CMAKE_SOURCE_DIR}/_deps/glfw/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/glad/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/assimp/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/yaml-cpp/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/msdfgen/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/sysx)
include_directories(${CMAKE_SOURCE_DIR}/_deps/glslang)
include_directories(${CMAKE_SOURCE_DIR}/_deps/rectpack2D/src)
include_directories(${CMAKE_SOURCE_DIR}/_deps/json/single_include)


include_directories(${CMAKE_SOURCE_DIR}/_deps/ztclog/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/box2d/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/openal-soft/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/stb)
include_directories(${CMAKE_BINARY_DIR}/_deps/assimp/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/SDL2/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/SDL3/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/gli)
include_directories(${CMAKE_SOURCE_DIR}/_deps/Mustache)
include_directories(${CMAKE_BINARY_DIR}/_deps/SDL3/include)
link_directories(${CMAKE_SOURCE_DIR}/_deps/glfw/lib)
include_directories(${CMAKE_SOURCE_DIR}/_deps/nvtt/include)
link_directories(${CMAKE_SOURCE_DIR}/_deps/nvtt/lib)
include_directories(${CMAKE_SOURCE_DIR}/_deps/freetype/include)
link_directories(${CMAKE_SOURCE_DIR}/_deps/msdfgen/lib)


include_directories(${CMAKE_SOURCE_DIR}/test/fxcc/app)

endif()



include_directories(${CMAKE_SOURCE_DIR}/_deps/mono/include/mono-2.0)
link_directories(${CMAKE_SOURCE_DIR}/_deps/mono/lib)


include_directories(${CMAKE_SOURCE_DIR}/_deps/imgui)
include_directories(${CMAKE_SOURCE_DIR}/_deps/imgui/backends)
include_directories(${CMAKE_SOURCE_DIR}/_deps/imnodes)
include_directories(${CMAKE_SOURCE_DIR}/_deps/ImGuizmo)
include_directories(${CMAKE_SOURCE_DIR}/_deps/ztclog/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/entt/single_include)

# include_directories(${CMAKE_SOURCE_DIR}/_deps/SOIL2/src/SOIL2)
include_directories(${CMAKE_SOURCE_DIR}/_deps/stb)

include_directories(${CMAKE_SOURCE_DIR}/_deps/PhysX/physx/install/linux/PhysX/include)

if(ANDROID)
link_directories(${CMAKE_SOURCE_DIR}/_deps/PhysX/physx/install/linux/PhysX/bin/linux.clang/debug)
endif()

if(UNIX AND NOT ANDROID AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
include_directories(${CMAKE_SOURCE_DIR}/_deps/PhysX/physx/install/linux/PhysX/include)
link_directories(${CMAKE_SOURCE_DIR}/_deps/PhysX/physx/install/linux/PhysX/bin/linux.clang/debug)
endif()

if(WIN32)
include_directories(${CMAKE_SOURCE_DIR}/_deps/PhysX/physx/install/vc15win64/PxShared/include)
include_directories(${CMAKE_SOURCE_DIR}/_deps/PhysX/physx/install/vc15win64/PhysX/include)
link_directories(${CMAKE_SOURCE_DIR}/_deps/PhysX/physx/install/vc15win64/PhysX/bin/win.x86_64.vc142.mt/$<CONFIG>)
endif()

include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${CMAKE_SOURCE_DIR}/include)

add_compile_definitions(FXCC_ASSERT_PATH="${CMAKE_SOURCE_DIR}/assert")

set(BUILD_SHARED_LIBS OFF)

add_subdirectory(src)
add_subdirectory(test)

set(BUILD_SHARED_LIBS OFF)
